package com.organ.base.service.impl;

import java.util.List;

import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.organ.base.entity.SysAttribute;
import com.organ.base.mapper.SysAttributeMapper;
import com.organ.base.service.SysAttributeService;

import lombok.AllArgsConstructor;

@Service
@AllArgsConstructor
public class SysAttributeServiceImpl extends ServiceImpl<SysAttributeMapper, SysAttribute> implements SysAttributeService {
	
	@Override
	public List<SysAttribute> finSysAttributeBytype(Integer pageBegin,Integer pageSize,String sysType) {
		return baseMapper.finSysAttributeBytype(pageBegin,pageSize, sysType);
	}

	@Override
	public Integer findCountsSysAttributeBytype(String sysType) {
		return this.baseMapper.selectCount(Wrappers.<SysAttribute>query().lambda().eq(SysAttribute::getSysType,sysType));
	}
}
